package com.lean.ssm.chapter3.dao;

import com.lean.ssm.chapter3.domain.Student;

import java.util.List;

public class StudentDao {
    public List<Student> selectStudent() {
        return null;
    }

    public int insertStudent(Student student) {
        return 0;
    }

    public List<Student> selectStudentByid(Student student) {
        return null;
    }
}
/*<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lean.ssm.chapter3.dao.StudentDao">
    <sql id=""></sql>

    <select id="selectStudent" resultType="com.lean.ssm.chapter3.domain.Student">
        select id,name,email,age from student order by id
    </select>
    <insert id="insertStudent" >
        insert into student values(#{id},#{name},#{email},#{age})
    </insert>
    <select id="selectStudentByid" resultType="Student">
        <include refid=""></include>
        select * from student
        <where>
            <if test="id!=null and id!=''">
                id=#{id}
            </if>
            <if test="age>0">
                or age=#{age}
            </if>
        </where>
    </select>
</mapper>*/